import React from 'react';
import Banner1 from "../img/banner1.jpg";
import Banner2 from "../img/banner2.jpg";
import Banner3 from "../img/banner3.jpg";
import { Carousel } from 'antd';
import Title from './title';

const contentStyle = {
    height: '340px',
    color: '#fff',
    lineHeight: '160px',
    textAlign: 'center',
    background: '#364d79',
};

export default class Banner extends React.Component {

    render() {
        return (
            <div className='clearFix'>
                <div className='banner'>
                    <div className="banner-content">
                        <Carousel autoplay>
                            <div className='img-box'>
                                <h3 style={contentStyle}>
                                    <img className='img'
                                        src={Banner1}
                                        alt='略略略' />
                                </h3>
                            </div>
                            <div className='img-box'>
                                <h3 style={contentStyle}>
                                    <img className='img'
                                        src={Banner2}
                                        alt='略略略' />
                                </h3>
                            </div>
                            <div className='img-box'>
                                <h3 style={contentStyle}>
                                    <img className='img'
                                        src={Banner3}
                                        alt='略略略' />
                                </h3>
                            </div>
                        </Carousel>
                    </div>
                </div>
                <div className='right-box'>
                    <div className='news'>
                        <h2 className='news-title'>
                            <span>最新</span>
                            {this.props.data.firstTitle}
                        </h2>
                        {/* <p className='news-text'>
                            {this.props.data.firstContent}
                        </p> */}
                        <Title 
                            className='news-list'
                            info={this.props.info}/>
                    </div>
                </div>
            </div>
        )
    }
}
